home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / OpenGL-ftn / fglmultmatrix.z / fglmultmatrix
Encoding:
Text File  |  2002-10-03  |  7.2 KB  |  151 lines

  1.  
  2.  
  3.  
  4. ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx((((3333GGGG))))              OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee              ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxxdddd,,,, ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxxffff - multiply the current matrix with the
  10.      specified matrix
  11.  
  12.  
  13. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  14.      SUBROUTINE ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxxdddd( CHARACTER*8 _m )
  15.      SUBROUTINE ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxxffff( CHARACTER*8 _m )
  16.  
  17.  
  18. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  19.      _m  Points to 16 consecutive values that are used as the elements of a
  20.         4 x 4 column-major matrix.
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx multiplies the current matrix with the one specified using
  24.      _m, and replaces the current matrix with the product.
  25.  
  26.      The current matrix is determined by the current matrix mode (see
  27.      ffffggggllllMMMMaaaattttrrrriiiixxxxMMMMooooddddeeee). It is either the projection matrix, modelview matrix, or
  28.      the texture matrix.
  29.  
  30. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  31.      If the current matrix is C, and the coordinates to be transformed are,
  32.      v = (v[0],v[1],v[2],v[3]).  Then the current transformation is C x v, or
  33.  
  34.  
  35.  
  36.                       (     c[0]      c[4]      c[8]        c[12] )      (     v[0] )
  37.  
  38.                       |                          |      |      |
  39.                            c[1]      c[5]       c[9]        c[13]            v[1]
  40.                       |                          |      |      |
  41.                                                    x
  42.                       |     c[2]      c[6]       c[10]       c[14] |      |     v[2] |
  43.  
  44.                       |                          |      |      |
  45.                        c[3]  c[7]  c[11]   c[15]       v[3]
  46.                       (                         )     (     )
  47.  
  48.  
  49.  
  50.      Calling ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx with an argument of m = m[0],m[1],...,m[15]
  51.      replaces the current transformation with (C x M) x v, or
  52.  
  53.  
  54.  
  55.       (     c[0]      c[4]      c[8]        c[12] )      (     m[0]      m[4]      m[8]        m[12] )      (     v[0] )
  56.  
  57.       |                          |      |                          |      |      |
  58.            c[1]      c[5]       c[9]        c[13]            m[1]      m[5]       m[9]        m[13]            v[1]
  59.       |                          |      |                          |      |      |
  60.                                    x                               x
  61.       |     c[2]      c[6]       c[10]       c[14] |      |     m[2]      m[6]       m[10]       m[14] |      |     v[2] |
  62.  
  63.       |                          |      |                          |      |      |
  64.        c[3]  c[7]  c[11]   c[15]       m[3]  m[7]  m[11]   m[15]       v[3]
  65.       (                         )     (                         )     (     )
  66.  
  67.  
  68.  
  69.      Where 'x' denotes matrix multiplication, and v is represented as a 4 x 1
  70.      matrix.
  71.  
  72. NNNNOOOOTTTTEEEESSSS
  73.      While the elements of the matrix may be specified with single or double
  74.      precision, the GL may store or operate on these values in less than
  75.      single precision.
  76.  
  77.  
  78.  
  79.  
  80.  
  81.                                                                         PPPPaaaaggggeeee 1111
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88. ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx((((3333GGGG))))              OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee              ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx((((3333GGGG))))
  89.  
  90.  
  91.  
  92.      In many computer languages 4 x 4 arrays are represented in row-major
  93.      order. The transformations just described represent these matrices in
  94.      column-major order.  The order of the multiplication is important. For
  95.      example, if the current transformation is a rotation, and ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx
  96.      is called with a translation matrix, the translation is done directly on
  97.      the coordinates to be transformed, while the rotation is done on the
  98.      results of that translation.
  99.  
  100. EEEERRRRRRRROOOORRRRSSSS
  101.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx is executed between
  102.      the execution of ffffggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ffffggggllllEEEEnnnndddd.
  103.  
  104. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  105.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____MMMMAAAATTTTRRRRIIIIXXXX____MMMMOOOODDDDEEEE
  106.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCOOOOLLLLOOOORRRR____MMMMAAAATTTTRRRRIIIIXXXX
  107.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____MMMMOOOODDDDEEEELLLLVVVVIIIIEEEEWWWW____MMMMAAAATTTTRRRRIIIIXXXX
  108.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____PPPPRRRROOOOJJJJEEEECCCCTTTTIIIIOOOONNNN____MMMMAAAATTTTRRRRIIIIXXXX
  109.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____MMMMAAAATTTTRRRRIIIIXXXX
  110.  
  111.  
  112. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  113.      ffffggggllllLLLLooooaaaaddddIIIIddddeeeennnnttttiiiittttyyyy, ffffggggllllLLLLooooaaaaddddMMMMaaaattttrrrriiiixxxx, ffffggggllllMMMMaaaattttrrrriiiixxxxMMMMooooddddeeee, ffffggggllllPPPPuuuusssshhhhMMMMaaaattttrrrriiiixxxx
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.                                                                         PPPPaaaaggggeeee 2222
  148.  
  149.  
  150.  
  151.